package com.dj.shop.service;

import com.dj.shop.bean.CartGoods;

import java.util.List;

/**
 * @author renshp
 * @Title: ShoppingCartService
 * @Description: TODO
 * @date 2019/3/6
 */
public interface ShoppingCartService {

    /***
     * 向购物车添加商品
     * @param userId 客户id
     * @param shopId 店铺id
     * @param shopGoodsId 店铺商品id
     * @return
     */
    public int addGoods(int userId, int shopId, int shopGoodsId);

    /***
     * 从购物车删除/减少商品
     * @param userId
     * @param shopId
     * @param shopGoodsId
     * @return
     */
    public int deleteGoods(int userId, int shopId, int shopGoodsId);

    /***
     * 查询所有购物车商品
     * @param userId
     * @param shopId
     * @return
     */
    public List<CartGoods> queryAllGoods(int userId, int shopId);

    /***
     * 清空购物车
     * @param userId
     * @param shopId
     * @return
     */
    public int clearAllGoods(int userId, int shopId);


    /***
     * 批量操作购物车
     * @param userId
     * @param shopId
     * @param status
     * @param cartGoodsIdList
     * @return
     */
    public int batchGoods(int userId, int shopId, String status, List<Integer> cartGoodsIdList);

}
